﻿<UserControl x:Class="StockTraderRI.Modules.Position.OrdersToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:inf="clr-namespace:StockTraderRI.Infrastructure;assembly=StockTraderRI.Infrastructure">
    <UserControl.Resources>
        <Style TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border BorderBrush="#FFD2E6F6" CornerRadius="8" Padding="4,4,4,4" BorderThickness="2,2,2,2">
                            <TextBlock x:Name="ButtonTextBlock" FontFamily="Franklin Gothic" FontSize="14" FontWeight="Normal" Foreground="#FF79B8EC" TextAlignment="Center" TextWrapping="Wrap">
                                <ContentPresenter/>
                            </TextBlock>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="ButtonTextBlock" Property="Foreground" Value="LightGray"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <StackPanel Orientation="Horizontal">
            <Button Name="SubmitToolbarButton" Margin="2,0 2,0" Command="{x:Static inf:StockTraderRICommands.SubmitOrderCommand}">Submit</Button>
            <Button Name="CancelToolbarButton" Margin="0,0 2,0" Command="{x:Static inf:StockTraderRICommands.CancelOrderCommand}">Cancel</Button>
            <Button Name="SubmitAllToolbarButton" Margin="0,0 2,0" Command="{x:Static inf:StockTraderRICommands.SubmitAllOrdersCommand}">Submit All</Button>
            <Button Name="CancelAllToolbarButton" Margin="0,0 2,0" Command="{x:Static inf:StockTraderRICommands.CancelAllOrdersCommand}">Cancel All</Button>
            </StackPanel>
    </Grid>
</UserControl>
